var app = angular.module('app', ['ngRoute', 'controllers']);

app.config(['$routeProvider', function ($routeProvider) {

    $routeProvider.when('/index', {
        templateUrl: '/assets/v3/partials/index.html',
        controller: 'IndexCtrl'
    });

    $routeProvider.when('/daijia', {
        templateUrl: '/assets/v3/partials/daijia.html',
        controller: 'DaijiaCtrl'
    });

    $routeProvider.when('/success', {
        templateUrl: '/assets/v3/partials/order_success.html',
        controller: 'SuccessCtrl'
    });

    $routeProvider.when('/cancel', {
        templateUrl: '/assets/v3/partials/order_cancel.html',
        controller: 'CancelCtrl'
    });

    $routeProvider.when('/execute', {
        templateUrl: '/assets/v3/partials/order_execute.html',
        controller: 'ExecuteCtrl'
    });

    $routeProvider.when('/zhuanche', {
        templateUrl: '/assets/v3/partials/zhuanche.html',
        controller: 'ZhuanCheCtrl'
    });

    $routeProvider.when('/paotui', {
        templateUrl: '/assets/v3/partials/paotui.html',
        controller: 'PaotuiCtrl'
    });

    $routeProvider.when('/payment', {
        templateUrl: '/assets/v3/partials/payment.html',
        controller: 'PaymentCtrl'
    });

    $routeProvider.when('/agreement', {
        templateUrl: '/assets/v3/partials/agreement.html',
        controller: 'AgreementCtrl'
    });

    $routeProvider.when('/login', {
        templateUrl: '/assets/v3/partials/login.html',
        controller: 'LoginCtrl'
    });

    $routeProvider.when('/area', {
        templateUrl: '/assets/v3/partials/area.html',
        controller: 'AreaCtrl'
    });

    $routeProvider.when('/areazhuan', {
        templateUrl: '/assets/v3/partials/areaZhuan.html',
        controller: 'AreaZhuanCtrl'
    });

    $routeProvider.when('/areaerrand', {
        templateUrl: '/assets/v3/partials/areaErrand.html',
        controller: 'AreaErrandCtrl'
    });
    $routeProvider.when('/assess', {
        templateUrl: '/assets/v3/partials/driver_assess.html',
        controller: 'AssessCtrl'
    });

    $routeProvider.otherwise({
                                 redirectTo: '/index'
                             });

}]);
